package com.lion.ball.modules.orderfood.domain.entity;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Comment;
import java.sql.Timestamp;

/**
 * @author Chris Chan
 * Create on 2025-10-18 13:33
 * Use for: 动态分组 数据实体类
 * Explain:
 * 
 */
@Getter
@Setter
@Entity
@Comment("动态分组表")
@Table(name = "ofd_dynamic_group")
public class OfdDynamicGroupEntity {
    // 主键
    @Comment("主键")
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    // 编码
    @Comment("编码")
	@NotNull
	@Column(name = "code", nullable = false)
    private long code;
    // 名称
    @Comment("名称")
	@Size(max = 255)
	@Column(name = "name")
    private String name;
    // 图片 URL
    @Comment("图片 URL")
	@Size(max = 255)
	@Column(name = "img")
    private String img;
    // 创建时间
    @Comment("创建时间")
	@Column(name = "create_time")
    private Timestamp createTime;
    // 更新时间
    @Comment("更新时间")
	@Column(name = "update_time")
    private Timestamp updateTime;
    // 是否删除 0 - 未删除 1 - 已删除
    @Comment("是否删除 0 - 未删除 1 - 已删除")
	@NotNull
	@Column(name = "is_deleted", columnDefinition = "TINYINT", nullable = false)
    private int isDeleted;
    // 状态 0 - 正常 1 - 异常
    @Comment("状态 0 - 正常 1 - 异常")
	@NotNull
	@Column(name = "status", columnDefinition = "TINYINT", nullable = false)
    private int status;
}